<?php
include 'connect.php';
$id = $_SESSION['userid'];
$foto = mysql_query ("Select foto from utenti where id='$id'");
$foto2 = mysql_fetch_row($foto);
?>


<div id="wrapper">
    	<div id="secWrapper">
        	<div id="container" class="clearfix">
            	<div id="mainCol" class="clearfix">
				    
		<h3 id="why">Cambia la tua Foto!</h3><br>
                   
		<font size="2">
		
	Foto attuale:<br><br>
	<img src="photos/<?php echo $foto2[0] ?>" width="140"> 
	<br><br>
	<form enctype="multipart/form-data" action="home.php?page=upfoto" method="POST">
	<input type="hidden" name="MAX_FILE_SIZE" value="1000000" />
	Carica nuova foto:<br><input size="22" name="uploadedfile" type="file" />
	<br><input type="submit" value="Upload" />
</form>
	
		</font>
                </div>
                